// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/19/2015 9:38:44 PM				
// -----------------------------

#ifndef _CTexture_h
#define _CTexture_h

#include "ITexture.h"
#include "DxIncludes.h"

namespace Flow
{

	class CTexture : public ITexture
	{
	public:
		CTexture();
		virtual ~CTexture();

		virtual void	Release();

		virtual Bool	Create(IGraphicsDevice* lpDevice, UInt32 uWidth, UInt32 uHeight, TextureFormat::Enum format, void* lpData);

		virtual void	Update(IGraphicsDevice* lpDevice, UInt32 uSubResource, void* lpData);

		virtual UInt32				GetWidth() const;
		virtual UInt32				GetHeight() const;
		virtual TextureFormat::Enum	GetFormat() const;
		virtual Bool				HasData() const;

	private:

		ID3D11Texture2D*			m_lpTexture;
		ID3D11ShaderResourceView*	m_lpShaderView;

		UInt32				m_Width;
		UInt32				m_Height;
		TextureFormat::Enum	m_Format;
		Bool				m_HasData;


		CTexture(const CTexture& refCTexture);
		CTexture& operator=(const CTexture& refCTexture);
	};

}

#include "ExportMacro.h"
EXPORT_IMPLEMENTATION(Texture);

#endif